﻿#region Using Directives

    using System;

    using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Common.Criteria
{
    /// <summary>
    /// Criteria class specifying a ClientGUID, ProfileGUID and ReportingPeriodGUID as search criteria.
    /// </summary>
    [Serializable]
    public class ClientGUIDAndProfileGUIDAndDateRangeCriteria : CriteriaBase<ClientGUIDAndProfileGUIDAndDateRangeCriteria>
    {

        #region Constructors

            /// <summary>
            /// Default constructor for this class
            /// </summary>
            /// <param name="clientGUID">The Guid of the Client to associate with this criteria</param>
            /// <param name="profileGUID">The Guid of the Profile to associate with this criteria</param>
            /// <param name="startDateTime">The Start Time to associate with this criteria</param>
            /// <param name="endDateTime">The End Time to associate with this criteria</param>
            public ClientGUIDAndProfileGUIDAndDateRangeCriteria(Nullable<Guid> clientGUID, Nullable<Guid> profileGUID, DateTime startDateTime, DateTime endDateTime)
            {
                ClientGUID = clientGUID;
                ProfileGUID = profileGUID;
                StartDateTime = startDateTime;
                EndDateTime = endDateTime;
            }

        #endregion

        #region Properties

            /// <summary>
            /// This GUID is used to identify the Client object associated with this criteria
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> ClientGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.ClientGUID);
            /// <summary>
            /// This GUID is used to identify the Client object associated with this criteria
            /// </summary>
            public Nullable<Guid> ClientGUID
            {
                get { return ReadProperty(ClientGUIDProperty); }
                private set { LoadProperty(ClientGUIDProperty, value); }
            }

            /// <summary>
            /// This GUID is used to identify the Profile object associated with this criteria
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> ProfileGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.ProfileGUID);
            /// <summary>
            /// This GUID is used to identify the Profile object associated with this criteria
            /// </summary>
            public Nullable<Guid> ProfileGUID
            {
                get { return ReadProperty(ProfileGUIDProperty); }
                private set { LoadProperty(ProfileGUIDProperty, value); }
            }

            /// <summary>
            /// The start date to associate with this criteria
            /// </summary>
            public static PropertyInfo<SmartDate> StartDateTimeProperty = RegisterProperty<SmartDate>(p => p.StartDateTime);
            /// <summary>
            /// The start date to associate with this criteria
            /// </summary>
            public SmartDate StartDateTime
            {
                get { return ReadProperty(StartDateTimeProperty); }
                private set { LoadProperty(StartDateTimeProperty, value); }
            }

            /// <summary>
            /// The end date to associate with this criteria
            /// </summary>
            public static PropertyInfo<SmartDate> EndDateTimeProperty = RegisterProperty<SmartDate>(p => p.EndDateTime);
            /// <summary>
            /// The end date to associate with this criteria
            /// </summary>
            public SmartDate EndDateTime
            {
                get { return ReadProperty(EndDateTimeProperty); }
                private set { LoadProperty(EndDateTimeProperty, value); }
            }


        #endregion

    }
}